package com.Register.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("volunteer_activity")
@Schema(description="志愿活动表")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class VolunteerActivity implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID-也是活动编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "活动名称")
    private String activityName;

    @Schema(description = "活动组织")
    private String organization;

    @Schema(description = "活动地点")
    private String activityLocation;

    @Schema(description = "联系人")
    private String linkman;

    @Schema(description = "联系方式")
    private String contact;

    @Schema(description = "标记是否删除")
    private Long deleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "begin_time",fill = FieldFill.INSERT)
    @Schema(description = "活动开始时间")
    private LocalDateTime beginTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "end_time",fill = FieldFill.INSERT)
    @Schema(description = "活动结束时间")
    private LocalDateTime endTime;

    @Schema(description = "招募人数")
    private Integer recruitNumber;

    @Schema(description = "已经报名人数")
    private Integer addNumber;

    @Schema(description = "招募岗位")
    private String recruitmentPositions;

    @Schema(description = "报名限制")
    private String enrollmentRestrictions;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "registration_deadline",fill = FieldFill.INSERT)
    @Schema(description = "报名截至时间")
    private LocalDateTime registrationDeadline;

    @Schema(description = "活动简介")
    private String eventDescription;

    @Schema(description = "活动内容")
    private String eventContent;

    @Schema(description = "活动介绍图片")
    private String eventPhoto;

    @Schema(description = "文章类别")
    private String tag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "修改时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "创建人,web端-创建人")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Long createUser;

    @Schema(description = "修改人,web端-修改人")
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
}
